<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="utf-8">
  <title>Strelitzia-后台管理系统-动态管理</title>
  <link href="/css/bootstrap.min.css" rel="stylesheet">
  <link href="/css/materialdesignicons.min.css" rel="stylesheet">
  <link href="/css/style.min.css" rel="stylesheet">
</head>

<body>
<div class="lyear-layout-web">
  <div class="lyear-layout-container">
    <!--左侧导航-->
    <aside class="lyear-layout-sidebar">

      <!-- logo -->
      <div id="logo" class="sidebar-header">
        <a href="/index"><img src="/images/logo-sidebar.png" title="LightYear" alt="LightYear"/></a>
      </div>
      <div class="lyear-layout-sidebar-scroll">

        <nav class="sidebar-main">
          <ul class="nav nav-drawer">
            <li class="nav-item"><a href="/index"><i class="mdi mdi-home"></i> 后台首页</a></li>
            <li class="nav-item"><a href="/account/1"><i class="mdi mdi-account-box"></i>账号管理</a></li>
            <li class="nav-item active"><a href="/dynamic/1"><i class="mdi mdi-share-variant"></i>动态管理</a></li>
            <li class="nav-item"><a href="/photo"><i class="mdi mdi-image-filter"></i>照片列表</a></li>
            <li class="nav-item"><a href="/notification"><i class="mdi mdi-message-text-outline"></i>发布通知</a></li>

          </ul>
        </nav>
      </div>

    </aside>
    <!--End 左侧导航-->

    <!--头部信息-->
    <header class="lyear-layout-header">
      <nav class="navbar navbar-default">
        <div class="topbar">
          <div class="topbar-left">
            <div class="lyear-aside-toggler">
              <span class="lyear-toggler-bar"></span>
              <span class="lyear-toggler-bar"></span>
              <span class="lyear-toggler-bar"></span>
            </div>
            <span class="navbar-page-title"> 账号管理 </span>
          </div>
        </div>
      </nav>
    </header>
    <!--End 头部信息-->

    <!--页面主要内容-->
    <main class="lyear-layout-content">

      <div class="container-fluid">

        <div class="row">
          <div class="col-lg-12">
            <div class="card">
              <div class="card-toolbar clearfix">
<!--                <form class="pull-right search-bar" method="get" action="/account/search" role="form">-->
<!--                  <div class="input-group">-->

<!--                    <input type="text" class="form-control" value="" name="keyword" placeholder="请输入用户名或邮箱">-->
<!--                    <div class="input-group-btn">-->
<!--                      <button class="btn btn-primary" id="search-btn" type="submit">-->
<!--                        搜索-->
<!--                      </button>-->
<!--                    </div>-->
<!--                  </div>-->
<!--                </form>-->
                <div class="toolbar-btn-action">
                  <!--                                    <a id="new" class="btn btn-primary m-r-5" href="javascript:void(0)"><i  class="mdi mdi-plus"></i> 新增</a>-->
                  <!--                  <a class="btn btn-danger" href="#!"><i class="mdi mdi-window-close"></i> 删除</a>-->
                </div>
              </div>
              <div class="card-body">

                <div class="table-responsive">
                  <table class="table table-bordered">
                    <thead>
                    <tr>
                      <th>编号</th>
                      <th>动态内容</th>
                      <th>发布人ID</th>
                      <th>时间</th>
                      <th>类型</th>
                      <th>点赞数</th>
                      <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr th:each="item : ${dynamics.records}">
                      <th scope="row" th:text="${itemStat.count}">1</th>
                      <td th:text="${item.content}"></td>
                      <td th:text="${item.uid}">果戈理</td>
                      <td th:text="${#dates.format(item.publishTime, 'yyyy年MM月dd日 HH点mm分')}">俄国</td>
                      <td th:if="${item.status == 0}"><font class="text-purple">私密</font></td>
                      <td th:if="${item.status == 1}"><font class="text-success">公开</font></td>
                      <td th:if="${item.status == 2}"><font class="text-info">朋友圈</font></td>
                      <td th:text="${item.likes}">俄国</td>

                      <td>
                        <div class="btn-group">
                          <a target="_blank" class="btn btn-xs btn-default" th:href="'/dynamic/details/'+${item.id}"><i class="mdi mdi-eye"></i></a>
                          <a class="btn btn-xs btn-default" th:href="'/dynamic/del/'+${item.id}">
                            <i class="mdi mdi-window-close"></i></a>
                        </div>
                      </td>
                    </tr>
                    </tbody>
                  </table>
                </div>
                <ul class="pagination">
                  <li th:class="${dynamics.hasPrevious()?'':'disabled'}">
                    <a th:if="${dynamics.hasPrevious()}" th:href="'/dynamic/'+${page - 1}">«</a>
                    <a th:unless="${dynamics.hasPrevious()}" href="javascript:void(0)">«</a>
                  </li>
                  <li th:each="i: ${#numbers.sequence(1, dynamics.pages)}"
                      th:class="${page==i?'active':''}"><a th:href="'/dynamic/'+${i}"
                                                           th:text="${i}">2</a></li>
                  <li th:class="${dynamics.hasNext()?'':'disabled'}">
                    <a th:if="${dynamics.hasNext()}" th:href="'/dynamic/'+${page + 1}">»</a>
                    <a th:unless="${dynamics.hasNext()}" href="javascript:void(0)">»</a>
                  </li>
                </ul>

              </div>
            </div>
          </div>

        </div>

      </div>

    </main>
    <!--End 页面主要内容-->
  </div>
</div>
<script type="text/javascript" src="/js/jquery.min.js"></script>
<script type="text/javascript" src="/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/js/perfect-scrollbar.min.js"></script>
<script type="text/javascript" src="/js/main.min.js"></script>
<script type="text/javascript">

</script>
</body>
</html>